<!DOCTYPE html>
<html lang="en" xmlns:th="http://www.thymeleaf.org">
<head>
    <meta charset="UTF-8">
    <title>Title</title>
</head>
<body>
<input th:include="common/inc">
<a href=\"#\" th:onclick=\"javaScript:delsBook()\">删除</a>&nbsp;|&nbsp;<a href=\"#\" th:onclick=\"javaScript:toDels()\">退出编辑</a>
</body>
<script>
    function delsBook() {
        var ids="";
        var books=$("input[name='bookid']:checked");
        for(var i=0;i<books.length;i++){
            ids+=","+books[i].value;
        }
        $.ajax({
            url:"delsBookShelf",
            data:{"ids":ids.substring(1)},
            type:"post",
            success:function () {
                alert("ok");
            },error:function () {
                alert("获取IDS失败");
            }
        })
    }
</script>
</html>